#ifndef UNIEDGES_HPP
#define UNIEDGES_HPP

#include "structEdgesBase.hpp"
#include "rectNormalsType.hpp"
#include "eigenConcat.hpp"

namespace hms {

template<>
class EdgesTraits<UniEdges>
{
public:
	using MeshType = UniMesh;
	using NormalsReturnType = RectNormalsType;

	using LengthsReturnType = 
	Eigen::CwiseNullaryOp<EigenCustom::ConcatFunctor<
		EigenCustom::Direction::vertical,
		Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<scalar>, ArrayXs>,
		Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<scalar>, ArrayXs>
	>, ArrayXs>;
};


class UniEdges : public StructEdgesBase<UniEdges>
{
public:
	using Traits = EdgesTraits<UniEdges>;
	using NormalsReturnType = typename Traits::NormalsReturnType;
	using LengthsReturnType = typename Traits::LengthsReturnType;
public:
	UniEdges() = default;
	UniEdges( const UniMesh& );
private:
	auto lengthsImp() const -> LengthsReturnType;
	auto normalsImp() const -> NormalsReturnType;

	friend EdgesBase;
};

} // namespace hms


#endif